import React, { Component } from 'react';
import { connect } from 'react-redux';
import { HashRouter as Router, Switch, Route, Redirect } from 'react-router-dom';
import Index from './pages/index/Index';
class App extends Component {
	render() {
		return (
			<Router>
				<Switch>
					<Route path="/index" component={Index} />
					<Redirect to="index" />
				</Switch>
			</Router>
		);
	}
}

const mapState = state => ({
	count: state.count
});

const mapDispatch = dispatch => ({
	add: value => {
		dispatch({ type: 'increase', value });
	}
});
export default connect(
	mapState,
	mapDispatch
)(App);
